#include<stdio.h>
int main(int argc, char const *argv[])
{
    int i,t,k,a[3];
    printf("There are following Armstrong number smaller than 1000:\n");
    for(i=2;i<1000;i++)
    {
        for(t=0,k=1000;k>=10;t++)
        {
            a[t]=(i%k)/(k/10);
            k/=10;
        }
        if(a[0]*a[0]*a[0]+a[1]*a[1]*a[1]+a[2]*a[2]*a[2]==i)
            printf("%d  ",i);
    }
    return 0;
}
